<template>
  <div class="app-container">
    <!--工具栏-->
    <div class="head-container">
      <el-form-item v-for="field in searchFieldOptions" :key="field.key" :label="field.displayname">
        <el-input v-model="query[field.key]" placeholder="" />
      </el-form-item>
      <div v-if="crud.props.searchToggle">
        <!-- 搜索 -->
        <label class="el-form-item-label">姓名</label>
        <el-input
          v-model="query.realName"
          clearable
          placeholder="姓名"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">昵称</label>
        <el-input
          v-model="query.nickName"
          clearable
          placeholder="昵称"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">微信名</label>
        <el-input
          v-model="query.wxName"
          clearable
          placeholder="微信名"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">微信号</label>
        <el-input
          v-model="query.wxNo"
          clearable
          placeholder="微信号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">微信OpenID号</label>
        <el-input
          v-model="query.wxOpenid"
          clearable
          placeholder="微信OpenID号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">电话号码</label>
        <el-input
          v-model="query.phoneNumber"
          clearable
          placeholder="电话号码"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">身份证号</label>
        <el-input
          v-model="query.idCardNumber"
          clearable
          placeholder="身份证号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">出生年月日</label>
        <el-input
          v-model="query.birthDate"
          clearable
          placeholder="出生年月日"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">身份证地址</label>
        <el-input
          v-model="query.idCardAddress"
          clearable
          placeholder="身份证地址"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">电子邮箱</label>
        <el-input
          v-model="query.email"
          clearable
          placeholder="电子邮箱"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师职称</label>
        <el-input
          v-model="query.physicianTitle"
          clearable
          placeholder="医师职称"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">注册科室</label>
        <el-input
          v-model="query.registeredDepartment"
          clearable
          placeholder="注册科室"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师职称注册范围</label>
        <el-input
          v-model="query.titleRegistrationScope"
          clearable
          placeholder="医师职称注册范围"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师职证称编号</label>
        <el-input
          v-model="query.titleCertificateNumber"
          clearable
          placeholder="医师职证称编号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师证执业证获取时间</label>
        <el-input
          v-model="query.practiceCertificateObtainedDate"
          clearable
          placeholder="医师证执业证获取时间"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师证原注册单位省份</label>
        <el-input
          v-model="query.originalRegistrationProvince"
          clearable
          placeholder="医师证原注册单位省份"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">原注册单位城市</label>
        <el-input
          v-model="query.originalRegistrationCity"
          clearable
          placeholder="原注册单位城市"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师证原注册单位名称</label>
        <el-input
          v-model="query.originalRegistrationUnitName"
          clearable
          placeholder="医师证原注册单位名称"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师证原注册单位级别</label>
        <el-input
          v-model="query.originalRegistrationUnitLevel"
          clearable
          placeholder="医师证原注册单位级别"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师证医院性质</label>
        <el-input
          v-model="query.hospitalNature"
          clearable
          placeholder="医师证医院性质"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师资格证编号</label>
        <el-input
          v-model="query.qualificationCertificateNumber"
          clearable
          placeholder="医师资格证编号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">资格证获取时间</label>
        <el-input
          v-model="query.qualificationObtainedDate"
          clearable
          placeholder="资格证获取时间"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">专业类别</label>
        <el-input
          v-model="query.specialtyCategory"
          clearable
          placeholder="专业类别"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">毕业学校</label>
        <el-input
          v-model="query.graduationSchool"
          clearable
          placeholder="毕业学校"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">学历</label>
        <el-input
          v-model="query.educationLevel"
          clearable
          placeholder="学历"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">医师执业证编号</label>
        <el-input
          v-model="query.physicianLicenseNumber"
          clearable
          placeholder="医师执业证编号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">药师专业类别</label>
        <el-input
          v-model="query.pharmacistSpecialtyCategory"
          clearable
          placeholder="药师专业类别"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">药师咨格证编号</label>
        <el-input
          v-model="query.pharmacistQualificationCertificateNumber"
          clearable
          placeholder="药师咨格证编号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">药师管理号</label>
        <el-input
          v-model="query.pharmacistManagementNumber"
          clearable
          placeholder="药师管理号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">药师注册证编号</label>
        <el-input
          v-model="query.pharmacistRegistrationCertificateNumber"
          clearable
          placeholder="药师注册证编号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">药师证签发单位</label>
        <el-input
          v-model="query.pharmacistIssuingUnit"
          clearable
          placeholder="药师证签发单位"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">药师执业类别</label>
        <el-input
          v-model="query.pharmacistPracticeCategory"
          clearable
          placeholder="药师执业类别"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">药师执业范围</label>
        <el-input
          v-model="query.pharmacistPracticeScope"
          clearable
          placeholder="药师执业范围"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">药师注册地址</label>
        <el-input
          v-model="query.pharmacistRegistrationAddress"
          clearable
          placeholder="药师注册地址"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">个人简介</label>
        <el-input
          v-model="query.personalProfile"
          clearable
          placeholder="个人简介"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">擅长科室及疾病用药</label>
        <el-input
          v-model="query.specialtiesAndDiseases"
          clearable
          placeholder="擅长科室及疾病用药"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">其他医疗相关证件</label>
        <el-input
          v-model="query.otherMedicalCertificates"
          clearable
          placeholder="其他医疗相关证件"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">开户行</label>
        <el-input
          v-model="query.bankName"
          clearable
          placeholder="开户行"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">银行卡帐号</label>
        <el-input
          v-model="query.bankAccountNumber"
          clearable
          placeholder="银行卡帐号"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">总收入</label>
        <el-input
          v-model="query.totalRevenue"
          clearable
          placeholder="总收入"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">等级评价</label>
        <el-input
          v-model="query.grade"
          clearable
          placeholder="等级评价"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">审核状态</label>
        <el-input
          v-model="query.auditStatus"
          clearable
          placeholder="审核状态"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">审核结果信息</label>
        <el-input
          v-model="query.auditResult"
          clearable
          placeholder="审核结果信息"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">审核时间</label>
        <el-input
          v-model="query.auditTime"
          clearable
          placeholder="审核时间"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">注册时间</label>
        <el-input
          v-model="query.registrationTime"
          clearable
          placeholder="注册时间"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">录入时间</label>
        <el-input
          v-model="query.createTime"
          clearable
          placeholder="录入时间"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">录入人员</label>
        <el-input
          v-model="query.createUserId"
          clearable
          placeholder="录入人员"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">修改时间</label>
        <el-input
          v-model="query.modifyTime"
          clearable
          placeholder="修改时间"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">修改人员</label>
        <el-input
          v-model="query.modifyUserId"
          clearable
          placeholder="修改人员"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <label class="el-form-item-label">最后登录时间</label>
        <el-input
          v-model="query.lastLonginTime"
          clearable
          placeholder="最后登录时间"
          style="width: 185px;"
          class="filter-item"
          @keyup.enter.native="crud.toQuery"
        />
        <rrOperation :crud="crud" />
      </div>
      <!--如果想在工具栏加入更多按钮，可以使用插槽方式， slot = 'left' or 'right'-->
      <crudOperation :permission="permission" />
      <!--表单组件-->
      <el-dialog
        :close-on-click-modal="false"
        :before-close="crud.cancelCU"
        :visible.sync="crud.status.cu > 0"
        :title="crud.status.title"
        width="500px"
      >
        <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
          <el-form-item label="姓名" prop="realName">
            <el-input v-model="form.realName" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="昵称" prop="nickName">
            <el-input v-model="form.nickName" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="微信名">
            <el-input v-model="form.wxName" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="微信号">
            <el-input v-model="form.wxNo" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="微信OpenID号">
            <el-input v-model="form.wxOpenid" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="电话号码" prop="phoneNumber">
            <el-input v-model="form.phoneNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="身份证号" prop="idCardNumber">
            <el-input v-model="form.idCardNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="本平台登录密码" prop="dqHrmPassword">
            <el-input v-model="form.dqHrmPassword" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="出生年月日">
            <el-date-picker v-model="form.birthDate" type="datetime" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="性别">
            <el-radio-group v-model="form.gender" style="width: 178px">
              <el-radio label="男">男</el-radio>
              <el-radio label="女">女</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="民族">
            <el-input v-model="form.ethnicity" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="身份证省份">
            <el-input v-model="form.idCardProvince" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="身份证地址">
            <el-input v-model="form.idCardAddress" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="电子邮箱">
            <el-input v-model="form.email" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师职称">
            <el-input v-model="form.physicianTitle" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="注册科室">
            <el-input v-model="form.registeredDepartment" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师职称注册范围">
            <el-input v-model="form.titleRegistrationScope" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师职证称编号">
            <el-input v-model="form.titleCertificateNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师证执业证获取时间">
            <el-date-picker v-model="form.practiceCertificateObtainedDate" type="datetime" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师证原注册单位省份">
            <el-input v-model="form.originalRegistrationProvince" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="原注册单位城市">
            <el-input v-model="form.originalRegistrationCity" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师证原注册单位名称">
            <el-input v-model="form.originalRegistrationUnitName" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师证原注册单位级别">
            <el-input v-model="form.originalRegistrationUnitLevel" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师证医院性质">
            <el-input v-model="form.hospitalNature" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师资格证编号">
            <el-input v-model="form.qualificationCertificateNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="资格证获取时间">
            <el-date-picker v-model="form.qualificationObtainedDate" type="datetime" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="专业类别">
            <el-input v-model="form.specialtyCategory" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="毕业学校">
            <el-input v-model="form.graduationSchool" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="学历">
            <el-input v-model="form.educationLevel" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="医师执业证编号">
            <el-input v-model="form.physicianLicenseNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="药师专业类别">
            <el-input v-model="form.pharmacistSpecialtyCategory" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="药师咨格证编号">
            <el-input v-model="form.pharmacistQualificationCertificateNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="药师管理号">
            <el-input v-model="form.pharmacistManagementNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="药师注册证编号">
            <el-input v-model="form.pharmacistRegistrationCertificateNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="药师证签发单位">
            <el-input v-model="form.pharmacistIssuingUnit" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="药师执业类别">
            <el-input v-model="form.pharmacistPracticeCategory" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="药师执业范围">
            <el-input v-model="form.pharmacistPracticeScope" :rows="3" type="textarea" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="药师注册地址">
            <el-input v-model="form.pharmacistRegistrationAddress" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="个人简介">
            <el-input v-model="form.personalProfile" :rows="3" type="textarea" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="擅长科室及疾病用药">
            <el-input v-model="form.specialtiesAndDiseases" :rows="3" type="textarea" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="其他医疗相关证件">
            <el-input v-model="form.otherMedicalCertificates" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="开户行">
            <el-input v-model="form.bankName" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="银行卡帐号">
            <el-input v-model="form.bankAccountNumber" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="总收入">
            <el-input v-model="form.totalRevenue" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="等级评价">
            <el-input v-model="form.grade" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="是否激活" prop="isEnable">
            未设置字典，请手动设置 Radio
          </el-form-item>
          <el-form-item label="审核状态">
            <el-input v-model="form.auditStatus" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="审核结果信息">
            <el-input v-model="form.auditResult" :rows="3" type="textarea" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="审核时间">
            <el-date-picker v-model="form.auditTime" type="datetime" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="注册时间">
            <el-date-picker v-model="form.registrationTime" type="datetime" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="录入时间">
            <el-date-picker v-model="form.createTime" type="datetime" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="录入人员">
            <el-input v-model="form.createUserId" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="修改时间">
            <el-date-picker v-model="form.modifyTime" type="datetime" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="修改人员">
            <el-input v-model="form.modifyUserId" style="width: 370px;" />
          </el-form-item>
          <el-form-item label="最后登录时间">
            <el-date-picker v-model="form.lastLonginTime" type="datetime" style="width: 370px;" />
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="text" @click="crud.cancelCU">取消</el-button>
          <el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
        </div>
      </el-dialog>
      <!--表格渲染-->
      <el-table
        ref="table"
        v-loading="crud.loading"
        :data="crud.data"
        size="small"
        style="width: 100%;"
        @selection-change="crud.selectionChangeHandler"
      >
        <el-table-column type="selection" width="55" />
        <el-table-column prop="realName" label="姓名" />
        <el-table-column prop="nickName" label="昵称" />
        <el-table-column prop="phoneNumber" label="电话号码" />
        <el-table-column prop="idCardNumber" label="身份证号" />
        <el-table-column prop="idCardProvince" label="身份证省份" />
        <el-table-column prop="idCardAddress" label="身份证地址" />
        <el-table-column prop="email" label="电子邮箱" />
        <el-table-column prop="physicianTitle" label="医师职称" />
        <el-table-column prop="registeredDepartment" label="注册科室" />
        <el-table-column prop="titleRegistrationScope" label="医师职称注册范围" />
        <el-table-column prop="titleCertificateNumber" label="医师职证称编号" />
        <el-table-column prop="practiceCertificateObtainedDate" label="医师证执业证获取时间" />
        <el-table-column prop="originalRegistrationProvince" label="医师证原注册单位省份" />
        <el-table-column prop="originalRegistrationCity" label="原注册单位城市" />
        <el-table-column prop="originalRegistrationUnitName" label="医师证原注册单位名称" />
        <el-table-column prop="originalRegistrationUnitLevel" label="医师证原注册单位级别" />
        <el-table-column prop="hospitalNature" label="医师证医院性质" />
        <el-table-column prop="qualificationCertificateNumber" label="医师资格证编号" />
        <el-table-column prop="qualificationObtainedDate" label="资格证获取时间" />
        <el-table-column prop="specialtyCategory" label="专业类别" />
        <el-table-column prop="graduationSchool" label="毕业学校" />
        <el-table-column prop="educationLevel" label="学历" />
        <el-table-column prop="physicianLicenseNumber" label="医师执业证编号" />
        <el-table-column prop="pharmacistSpecialtyCategory" label="药师专业类别" />
        <el-table-column prop="pharmacistQualificationCertificateNumber" label="药师咨格证编号" />
        <el-table-column prop="pharmacistManagementNumber" label="药师管理号" />
        <el-table-column prop="pharmacistRegistrationCertificateNumber" label="药师注册证编号" />
        <el-table-column prop="pharmacistIssuingUnit" label="药师证签发单位" />
        <el-table-column prop="pharmacistPracticeCategory" label="药师执业类别" />
        <el-table-column prop="pharmacistPracticeScope" label="药师执业范围" />
        <el-table-column prop="pharmacistRegistrationAddress" label="药师注册地址" />
        <el-table-column prop="personalProfile" label="个人简介" />
        <el-table-column prop="specialtiesAndDiseases" label="擅长科室及疾病用药" />
        <el-table-column prop="otherMedicalCertificates" label="其他医疗相关证件" />
        <el-table-column prop="bankName" label="开户行" />
        <el-table-column prop="bankAccountNumber" label="银行卡帐号" />
        <el-table-column prop="totalRevenue" label="总收入" />
        <el-table-column prop="grade" label="等级评价" />
        <el-table-column prop="isEnable" label="是否激活" />
        <el-table-column prop="auditStatus" label="审核状态" />
        <el-table-column prop="auditResult" label="审核结果信息" />
        <el-table-column prop="auditTime" label="审核时间" />
        <el-table-column prop="registrationTime" label="注册时间" />
        <el-table-column prop="createTime" label="录入时间" />
        <el-table-column prop="createUserId" label="录入人员" />
        <el-table-column prop="modifyTime" label="修改时间" />
        <el-table-column prop="modifyUserId" label="修改人员" />
        <el-table-column prop="lastLonginTime" label="最后登录时间" />
        <el-table-column
          v-if="checkPer(['admin','dqDoctors:edit','dqDoctors:del'])"
          label="操作"
          width="150px"
          align="center"
        >
          <template slot-scope="scope">
            <udOperation :data="scope.row" :permission="permission" />
          </template>
        </el-table-column>
      </el-table>
      <!--分页组件-->
      <pagination />
    </div>
  </div>
</template>

<script>
import crudDqDoctors from '@/api/dqhrm/doctor'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'

const defaultForm = { id: null, realName: null, nickName: null, wxName: null, wxNo: null, wxOpenid: null, phoneNumber: null, idCardNumber: null, dqHrmPassword: null, birthDate: null, gender: null, ethnicity: null, idCardProvince: null, idCardAddress: null, email: null, physicianTitle: null, registeredDepartment: null, titleRegistrationScope: null, titleCertificateNumber: null, practiceCertificateObtainedDate: null, originalRegistrationProvince: null, originalRegistrationCity: null, originalRegistrationUnitName: null, originalRegistrationUnitLevel: null, hospitalNature: null, qualificationCertificateNumber: null, qualificationObtainedDate: null, specialtyCategory: null, graduationSchool: null, educationLevel: null, physicianLicenseNumber: null, pharmacistSpecialtyCategory: null, pharmacistQualificationCertificateNumber: null, pharmacistManagementNumber: null, pharmacistRegistrationCertificateNumber: null, pharmacistIssuingUnit: null, pharmacistPracticeCategory: null, pharmacistPracticeScope: null, pharmacistRegistrationAddress: null, personalProfile: null, specialtiesAndDiseases: null, otherMedicalCertificates: null, bankName: null, bankAccountNumber: null, totalRevenue: null, grade: null, isEnable: null, auditStatus: null, auditResult: null, auditTime: null, registrationTime: null, createTime: null, createUserId: null, modifyTime: null, modifyUserId: null, lastLonginTime: null }
export default {
  name: 'DqDoctors',
  components: { pagination, crudOperation, rrOperation, udOperation },
  mixins: [presenter(), header(), form(defaultForm), crud()],
  dicts: ['gender'],
  cruds() {
    return CRUD({ title: '医生信息', url: 'api/dqDoctors', idField: 'id', sort: 'id,desc', crudMethod: { ...crudDqDoctors }})
  },
  data() {
    return {
      permission: {
        add: ['admin', 'dqDoctors:add'],
        edit: ['admin', 'dqDoctors:edit'],
        del: ['admin', 'dqDoctors:del']
      },
      rules: {
        id: [
          { required: true, message: '主键ID不能为空', trigger: 'blur' }
        ],
        realName: [
          { required: true, message: '姓名不能为空', trigger: 'blur' }
        ],
        nickName: [
          { required: true, message: '昵称不能为空', trigger: 'blur' }
        ],
        phoneNumber: [
          { required: true, message: '电话号码不能为空', trigger: 'blur' }
        ],
        idCardNumber: [
          { required: true, message: '身份证号不能为空', trigger: 'blur' }
        ],
        dqHrmPassword: [
          { required: true, message: '本平台登录密码不能为空', trigger: 'blur' }
        ],
        isEnable: [
          { required: true, message: '是否激活不能为空', trigger: 'blur' }
        ]
      },
      queryTypeOptions: [
        { key: 'realName', display_name: '姓名' },
        { key: 'nickName', display_name: '昵称' },
        { key: 'wxName', display_name: '微信名' },
        { key: 'wxNo', display_name: '微信号' },
        { key: 'wxOpenid', display_name: '微信OpenID号' },
        { key: 'phoneNumber', display_name: '电话号码' },
        { key: 'idCardNumber', display_name: '身份证号' },
        { key: 'birthDate', display_name: '出生年月日' },
        { key: 'idCardAddress', display_name: '身份证地址' },
        { key: 'email', display_name: '电子邮箱' },
        { key: 'physicianTitle', display_name: '医师职称' },
        { key: 'registeredDepartment', display_name: '注册科室' },
        { key: 'titleRegistrationScope', display_name: '医师职称注册范围' },
        { key: 'titleCertificateNumber', display_name: '医师职证称编号' },
        { key: 'practiceCertificateObtainedDate', display_name: '医师证执业证获取时间' },
        { key: 'originalRegistrationProvince', display_name: '医师证原注册单位省份' },
        { key: 'originalRegistrationCity', display_name: '原注册单位城市' },
        { key: 'originalRegistrationUnitName', display_name: '医师证原注册单位名称' },
        { key: 'originalRegistrationUnitLevel', display_name: '医师证原注册单位级别' },
        { key: 'hospitalNature', display_name: '医师证医院性质' },
        { key: 'qualificationCertificateNumber', display_name: '医师资格证编号' },
        { key: 'qualificationObtainedDate', display_name: '资格证获取时间' },
        { key: 'specialtyCategory', display_name: '专业类别' },
        { key: 'graduationSchool', display_name: '毕业学校' },
        { key: 'educationLevel', display_name: '学历' },
        { key: 'physicianLicenseNumber', display_name: '医师执业证编号' },
        { key: 'pharmacistSpecialtyCategory', display_name: '药师专业类别' },
        { key: 'pharmacistQualificationCertificateNumber', display_name: '药师咨格证编号' },
        { key: 'pharmacistManagementNumber', display_name: '药师管理号' },
        { key: 'pharmacistRegistrationCertificateNumber', display_name: '药师注册证编号' },
        { key: 'pharmacistIssuingUnit', display_name: '药师证签发单位' },
        { key: 'pharmacistPracticeCategory', display_name: '药师执业类别' },
        { key: 'pharmacistPracticeScope', display_name: '药师执业范围' },
        { key: 'pharmacistRegistrationAddress', display_name: '药师注册地址' },
        { key: 'personalProfile', display_name: '个人简介' },
        { key: 'specialtiesAndDiseases', display_name: '擅长科室及疾病用药' },
        { key: 'otherMedicalCertificates', display_name: '其他医疗相关证件' },
        { key: 'bankName', display_name: '开户行' },
        { key: 'bankAccountNumber', display_name: '银行卡帐号' },
        { key: 'totalRevenue', display_name: '总收入' },
        { key: 'grade', display_name: '等级评价' },
        { key: 'auditStatus', display_name: '审核状态' },
        { key: 'auditResult', display_name: '审核结果信息' },
        { key: 'auditTime', display_name: '审核时间' },
        { key: 'registrationTime', display_name: '注册时间' },
        { key: 'createTime', display_name: '录入时间' },
        { key: 'createUserId', display_name: '录入人员' },
        { key: 'modifyTime', display_name: '修改时间' },
        { key: 'modifyUserId', display_name: '修改人员' },
        { key: 'lastLonginTime', display_name: '最后登录时间' }
      ]
    }
  },
  methods: {
    // 钩子：在获取表格数据之前执行，false 则代表不获取数据
    [CRUD.HOOK.beforeRefresh]() {
      return true
    }
  }
}
</script>

<style scoped>

</style>
